function [VaRt] = VaRHistorical(rPortfolio, w, anpha)
    Rp = w * rPortfolio.';
    for i=2:length(Rp)
        Rp(i) = Rp(i-1)+Rp(i);
    end

    % VaR 
    R = sort(Rp);
    index = floor((1 - anpha) * (length(R) - 1) + 1);
    VaRt = R(index);
end